home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1994 November / Cd Ware (Nro. 2) - Epimundo.iso / DOS / UD / CHG.ZIP / CHG.DOC < prev    next >
Encoding:
Text File  |  1994-04-28  |  9.2 KB  |  244 lines

  1.  
  2.                                CHG 3.3
  3.  
  4.                          A Program to Change
  5.                   File Attributes, Dates, and Times
  6.                                - and -
  7.                        Hide/Unhide directories
  8.                             April 5, 1994
  9.  
  10.  
  11.      Syntax
  12.      ------
  13.  
  14.      CHG Filespec [options]
  15.  
  16.      Options
  17.      -------------------------------------------
  18.      /          - chg to system date
  19.      mm/dd/yy   - chg to mm/dd/yy
  20.      :          - chg to system time
  21.      hh:mm      - chg to hh:mm
  22.      DH         - hide directory(s)
  23.      DX         - unhide directory(s)
  24.      D          - read attributes of directory(s)
  25.      RHSA       - set file(s) to RHSA
  26.      R          - set file(s) to R
  27.      X          - reset readonly file attributes (no system files)
  28.      Z          - reset all file attributes
  29.  
  30.      Execution  of  CHG  without  parameters  generates  a useful help
  31.      screen,  returning  a  DOS  error  level  of   1.    Normal   CHG
  32.      terminations   always  return  0  for  the  error  level.   Error
  33.      conditions, whether flagged on the screen or not,  are  indicated
  34.      by an error level of 1.
  35.  
  36.      CHG,  unlike  ATTRIB and other replacements for DOS ATTRIB, keeps
  37.      to an absolute minimum number of keystrokes to run  the  program.
  38.      Thus  the  option  string  is  a  cluster  of letters (see below)
  39.      indicating attributes to apply, rather than  '-'  and  '+'  signs
  40.      associated  with each attribute letter.  CHG's focus on keystroke
  41.      optimisation also overcomes a problem in other programs  of  this
  42.      type - to wit, their inability to handle filenames with dashes or
  43.      underscores.
  44.  
  45.      New Features
  46.      ------------
  47.      Version  3.3  of  CHG  offers  several  new  features,  the  most
  48.      important of which is that the X option now merely  reverses  the
  49.      impact  of  the  Readonly  attribute, if any.  It does not affect
  50.      other  attributes,  such  as  the  System,  Hidden,  or   Archive
  51.      attributes  and  does  not affect the readonly status of any file
  52.      that has the System attribute.  The new Z function does what  the
  53.      old  X function used to do: Sets all files covered by Filespec to
  54.      absolute reset status.
  55.  
  56.      CHG now comes with two other executables:
  57.  
  58.      CHGB.EXE  - Just like CHG.EXE, except that it has no video
  59.                  output.
  60.  
  61.      CHGC.EXE  - Does just one thing: resets files covered by a
  62.                  wildcard  in  local  directory  from  readonly status
  63.                  without touching any system files (equivalent  to  no
  64.                  video, no pathing, no options but the X option).
  65.  
  66.                  In   this   program,  absence  of  any  command  line
  67.                  parameter is equivalent to
  68.  
  69.                  CHGC *.*
  70.  
  71.                  The  user  may  still  use  any  non-pathed  file  or
  72.                  wildcard on the command line; but if CHGC  finds  any
  73.                  blank  on  the command line, it will abort with error
  74.                  level 1.
  75.  
  76.  
  77.      Comments on Filename/wildcard
  78.      -----------------------------
  79.      Except for CHGC.EXE, the filename or wildcard argument may either
  80.      have no drive or path specifiers or may be fully pathed, as in  a
  81.      filespec.   With  no  path  or drive information, CHG assumes the
  82.      default drive and path.
  83.  
  84.      However, if the user wishes to change all files  in  the  default
  85.      path, he/she must either use the regular '*.*' wildcard format or
  86.      the  '.'  shortcut,  which  is  also  supported  by  regular  DOS
  87.      commands.
  88.  
  89.      Except for CHGC (which admits  no  pathing),  CHG  also  supports
  90.      other  normal  DOS  shortcuts,  such  as "..\." and "..\XYZ\." in
  91.      place of the usual format for wildcards.  One may also change the
  92.      attributes, dates or times of all files in a directory simply  by
  93.      mentioning  the  directory  name,  without the wildcard notation.
  94.      Thus,
  95.  
  96.      CHG WORK R
  97.  
  98.      sets all files in WORK to read only, just as would
  99.  
  100.      CHG WORK\. R        or   CHG WORK\*.* R
  101.  
  102.      CHG also supports directories,  but  permits  changing  only  the
  103.      Hidden  attribute of a directory or directory wildcard.  Attempts
  104.      to change other directory information cause CHG to return to  DOS
  105.      with the message
  106.  
  107.      Not supported
  108.  
  109.      Where  DH  or  DX  is  used  as  the  option string, DOS wildcard
  110.      shortcuts are not supported.  To hide all sub-directories of  the
  111.      current directory, just use the syntax,
  112.  
  113.      CHG * DH
  114.  
  115.      To reset, use
  116.  
  117.      CHG * DX
  118.  
  119.      To read the current status of all subdirectories, use
  120.  
  121.      CHG * D
  122.  
  123.  
  124.      Comments on the option-string
  125.      -----------------------------
  126.      There are three mutually exclusive types of option-strings:
  127.  
  128.        1) Attribute-setting option strings.
  129.           ---------------------------------
  130.           These must contain the letters R, H, S, A, X (or Z), or D in
  131.           any combination or order.
  132.  
  133.           These flags have the following meanings:
  134.  
  135.           D:  Directory
  136.           R:  Read Only
  137.           H:  Hidden
  138.           S:  System
  139.           A:  Archive
  140.           X:  Reset  (only from Read Only for files, only from
  141.                       Hidden for directories)
  142.           Z:  Reset  (only from file attributes to absolute reset)
  143.  
  144.           Where the FIRST CHARACTER of the  option  string  is  D,  it
  145.           identifies  the file as a directory.  CHG supports directory
  146.           wildcards as well as file wildcards.
  147.  
  148.           For both files and directories, CHG uses  X  for  the  reset
  149.           function.   However, the displayed attribute of a reset file
  150.           or directory is always null.
  151.  
  152.           Where the user specifies the input filespec as  a  directory
  153.           by  using  the  D prefix on the option string, the directory
  154.           attribute  is  omitted  if  the  directory  is  reset  (i.e.
  155.           visible).
  156.  
  157.           Supported display attributes:  R, H, S, A
  158.  
  159.           Directory examples
  160.           ------------------
  161.           CHG . D             Reads the attributes of all sub-
  162.                               directories in the default directory.
  163.  
  164.           CHG work\* DH       Sets all subdirectories of \work to
  165.                               Hidden.
  166.  
  167.           CHG . DX            Resets all subdirectories of the default
  168.                               directory.
  169.  
  170.           CHG ABC D           Reads attribute of subdirectory ABC.
  171.                               (No attribute will show if reset)
  172.  
  173.           CHG A* Dh           Sets all subdirectories beginning
  174.                               with A to Hidden.
  175.  
  176.           File examples
  177.           -------------
  178.           CHG XYZ R           Sets file XYZ to Read Only.
  179.  
  180.           CHG *.SYS RHSA      Sets all .SYS files to Read Only
  181.                               Hidden System Archive.
  182.  
  183.           CHG \SYS\*.DOC X    Resets all readonly attributes of
  184.                               files in the \SYS subdirectory.
  185.  
  186.           CHG D:SYS H         Hides all files in D:\defaultpath\SYS
  187.  
  188.           CHG C:              Reads all files in C:\defaultpath
  189.  
  190.           CHG . X             Resets all readonly attributes of
  191.                               files in the current directory, without
  192.                               affecting any System files that may be
  193.                               found there.
  194.  
  195.           CHG . Z             Removes all attributes of files in
  196.                               the current directory.
  197.  
  198.  
  199.           What happens in default mode
  200.           ----------------------------
  201.           Where  the  second parameter is omitted, or where the second
  202.           parameter is simply a D, CHG simply displays attributes.  In
  203.           this mode, no change is made to files or directories.
  204.  
  205.        2) Date-setting option-strings
  206.           ---------------------------
  207.           If you wish to change the date of a file or series of  files
  208.           determined by a wildcard mask, just use your desired date in
  209.           American slash format as your option-string.
  210.  
  211.           Examples
  212.           --------
  213.           CHG RENAME.COM 2/1/89    Changes RENAME.COM to 02-01-1989.
  214.  
  215.           CHG ABC /                Changes ABC to current computer
  216.                                    date.  (i.e.  to system date)
  217.  
  218.           Caveat -
  219.           If you attempt to change the date/time stamp of a Read  Only
  220.           file, no date/time stamp change will occur.
  221.  
  222.        3) Time-setting option strings
  223.           ---------------------------
  224.           Here,  CHG  uses  the  colon  (':') to recognise your option
  225.           string as a time.  CHG updates the time-stamp of a  file  to
  226.           one-minute precision.
  227.  
  228.           Examples
  229.           --------
  230.           CHG ABC.EXE 5:40         Changes ABC.EXE to 05:40 A.M.
  231.  
  232.           CHG ABC.EXE 14:20        Changes ABC.EXE to 02:20 P.M.
  233.  
  234.           CHG *.EXE :              Changes all .EXE files to current
  235.                                    computer time (i.e. to system time).
  236.  
  237.           Caveat -
  238.           If  you attempt to change the date/time stamp of a Read Only
  239.           file, no date/time stamp change will occur.
  240.  
  241.  
  242.      -------------------------
  243.       End of documentation
  244.